package com.alibaba.citrus.ots.sales.plan.api.salesplan.audit;

import com.alibaba.citrus.ots.sales.plan.dto.api.request.SalesPlanBatchAuditRequest;
import com.alibaba.citrus.ots.sales.plan.dto.api.request.SalesPlanBatchAuditResponse;
import com.alibaba.citrus.ots.sales.plan.sdo.SalesPlanAuditSDO;
import com.alibaba.lattice2.epoch.meshflow.model.annotation.MeshFlowService;
import com.alibaba.lattice2.epoch.sdk.model.Result;

@MeshFlowService(apps = {"bc_ots"}, name = "salesPlanAuditWriteService")
public interface SalesPlanAuditWriteService {

    /**
     * 更新审核单状态
     * 通过/通过/驳回/终止等状态   纪元审批流回调
     * @param request
     * @return
     */
    Result<Boolean> updateSalesPlanAuditStatus(SalesPlanAuditSDO request);

    /**
     * 创建审批单
     * @param salesPlanAuditSDO
     * @return
     */
    Result<String> create(SalesPlanAuditSDO salesPlanAuditSDO);

    /**
     * 更新审批单
     * @param salesPlanAuditSDO
     * @return
     */
    Result<Boolean> edit(SalesPlanAuditSDO salesPlanAuditSDO);

    /**
     * 批量审批任务
     * @param request
     * @return
     */
    Result<SalesPlanBatchAuditResponse> batchAuditTask(SalesPlanBatchAuditRequest request);
}
